import VueRouter from 'vue-router';

let routes = [
    {
        path : '/admin/main',
        component : require('./index.vue')
    },
    {
        path : '/admin/users',
        component : require('./user/list.vue')
    },
    {
        path : '/admin/admins',
        component : require('./admin/list.vue')
    },
    {
        path : '/admin/permissions',
        component : require('./admin/permission-list.vue')
    },
    {
        path : '/admin/roles',
        component : require('./admin/role-list.vue')
    },
    {
        path : '/admin/menus',
        component : require('./menu/list.vue')
    },
    {
        path : '/admin/login',
        component : require('./user/login.vue')
    },
    {
        path : '/admin/register',
        component : require('./user/register.vue')
    },
    {
        path: "*",
        redirect: '/admin/main'
    }
];

export default new VueRouter({
    routes
});
